<script setup lang="ts">
import { zhCN, zhTW, dateZhCN, dateZhTW, darkTheme, lightTheme } from 'naive-ui'
import { Sunny, Moon } from '@vicons/ionicons5'
import Demo from './components/Demo.vue'
type LocaleType = 'zhCN' | 'zhTW'
const locale = ref<LocaleType>('zhCN')
const isDark = ref(false)
const langOpt = [
  { label: '简体中文', key: 'zhCN' },
  { label: '繁体中文', key: 'zhTW' },
]
const langList = {
  zhCN: { locale: zhCN, label: '简体中文', dataLocale: dateZhCN },
  zhTW: { locale: zhTW, label: '繁体中文', dataLocale: dateZhTW },
}
const handleSelect = (e: LocaleType) => {
  locale.value = e
}
</script>
<template>
  <NConfigProvider
    :locale="langList[locale].locale"
    :date-locale="langList[locale].dataLocale"
    :theme="isDark === true ? darkTheme : lightTheme"
  >
    <NGlobalStyle />
  <n-space>
    <n-button>Default</n-button>
    <n-button type="tertiary">
      Tertiary
    </n-button>
    <n-button type="primary">
      Primary
    </n-button>
    <n-button type="info">
      Info
    </n-button>
    <n-button type="success">
      Success
    </n-button>
    <n-button type="warning">
      Warning
    </n-button>
    <n-button type="error">
      Error
    </n-button>
  </n-space>
    <!-- vue-router占位 -->
<demo />
    <!-- <router-view/> -->
  </NConfigProvider>
</template>
<style>

</style>
